package com.pinkpig.excel.row;


import com.pinkpig.excel.metadata.TableMetaData;
import com.pinkpig.excel.row.model.ColumnHeadRowModel;
import com.pinkpig.excel.row.model.RowModel;

import java.util.ArrayList;
import java.util.List;

/**
 * @author vincenfeng
 */
public class ColumnHeadRowModelBuilder implements RowModelBuilder<TableMetaData> {

    private static List<RowModel> columnHeadRowModels;

    @Override
    public List<RowModel> build(TableMetaData tableMetaData){
        if(null==columnHeadRowModels){
            columnHeadRowModels = new ArrayList<>();
            ColumnHeadRowModel columnHeadRowModel = new ColumnHeadRowModel();
            columnHeadRowModels.add(columnHeadRowModel);
        }
        return columnHeadRowModels;
    }

}
